import Home from '../../views/Home.vue'

export default [
  {
    path: '/home',
    name: 'Home',
    redirect: '/home/welcome',
    component: Home,
    meta: {
      author: ['管理员', '出题者']
    },
    children: [
      {
        path: 'welcome',
        name: 'welcome',
        meta: {
          author: ['管理员', '出题者']
        },
        id: 0,
        component: () => import(/* webpackChunkName: "Home" */ '../../components/Welcome.vue')
      },
      {
        path: 'testManage',
        name: 'testManage',
        meta: {
          author: ['管理员', '出题者']
        },
        component: () => import('../../views/Home/TestManage/index.vue'),
        title: '试题管理',
        id: 1,
        icon: 'md-american-football',
        children: [
          {
            title: '添加试题',
            id: 11,
            path: 'addQuestions',
            name: 'addQuestions',
            meta: {
              author: ['管理员', '出题者']
            },
            component: () => import(/* webpackChunkName: "AddQuestions" */ '../../components/question/AddQuestions.vue')
          },
          {
            title: '试题分类',
            id: 12,
            path: 'questionsType',
            name: 'questionsType',
            meta: {
              author: ['管理员', '出题者']
            },
            component: () => import(/* webpackChunkName: "QuestionsType" */ '../../components/question/QuestionsType.vue')
          },
          {
            title: '查看试题',
            id: 13,
            path: 'watchQuestions',
            name: 'watchQuestions',
            meta: {
              author: ['管理员', '出题者']
            },
            component: () => import(/* webpackChunkName: "WatchQuestions" */ '../../components/question/WatchQuestions.vue')
          },
          {
            // 试题详情

            path: 'editQuestion',
            name: 'editQuestion',
            meta: {
              author: ['管理员', '出题者']
            },
            component: () => import(/* webpackChunkName: "EditQuestion" */ '../../components/question/EditQuestion.vue'),
            props: (router) => ({ query: router.query })
          },
          {
            // 试题详情
            path: 'questions/detail',
            name: 'questionsDetail',
            meta: {
              author: ['管理员', '出题者']
            },
            component: () => import(/* webpackChunkName: "DetailQuestion" */ '../../components/question/DetailQuestion.vue'),
            props: (router) => ({ query: router.query })
          }
        ]
      },
      {
        // 用户管理
        path: 'usermanage',
        name: 'UserManage',
        meta: {
          author: ['管理员']
        },
        component: () => import('../../views/Home/UserManage/index.vue'),
        title: '用户管理',
        icon: 'md-person',
        id: 2,
        children: [
          {
            // 添加用户
            path: 'addUser',
            name: 'addUser',
            component: () => import(/* webpackChunkName: "AddUser" */ '../../components/user/AddUser.vue'),
            meta: {
              author: ['管理员']
            },
            title: '添加用户',
            id: 21
          },
          {
            // 用户列表
            path: 'showUser',
            name: 'showUser',
            component: () => import(/* webpackChunkName: "ShowUser" */ '../../components/user/ShowUser.vue'),
            meta: {
              author: ['管理员']
            },
            title: '用户展示',
            id: 22
          }
        ]
      },
      {
        // 考试管理
        path: 'exammanage',
        name: 'ExamManage',
        meta: {
          author: ['管理员', '出题者']
        },
        component: () => import('../../views/Home/ExamManage/index.vue'),
        title: '考试管理',
        icon: 'ios-mail-outline',
        id: 3,
        children: [
          {
            path: 'addExam',
            name: 'AddExam',
            meta: {
              author: ['管理员', '出题者']
            },
            component: () => import(/* webpackChunkName: "exam" */ '../../components/exam/AddExam.vue'),
            title: '添加考试',
            id: 31
          },
          {
            // 考试列表
            path: 'exam/list',
            name: 'ExamTest',
            meta: {
              author: ['管理员', '出题者']
            },
            component: () => import(/* webpackChunkName: "exam" */ '../../components/exam/List.vue'),
            title: '试卷列表',
            id: 32
          },
          {
            // 创建试卷
            path: 'exam/edit',
            name: 'ExamEdit',
            meta: {
              author: ['管理员', '出题者']
            },
            component: () => import(/* webpackChunkName: "exam" */ '../../components/exam/EditExam.vue')
          },
          {
            //   试卷详情
            path: 'exam/detail',
            name: 'ExamDetail',
            meta: {
              author: ['管理员', '出题者']
            },
            component: () => import(/* webpackChunkName: "exam" */ '../../components/exam/ExamDetail.vue')
          }
        ]
      },
      {
        // 班级管理
        path: 'classmanage',
        name: 'ClassManage',
        meta: {
          author: ['管理员', '出题者']
        },
        component: () => import('../../views/Home/ClassManage/index.vue'),
        title: '班级管理',
        icon: 'ios-paper',
        id: 4,
        children: [
          {
            // 班级管理
            path: 'grade',
            name: 'garde',
            meta: {
              author: ['管理员', '出题者']
            },
            component: () => import(/* webpackChunkName: "class" */ '../../components/class/Grade.vue'),
            title: '班级管理',
            id: 41

          },
          {
            // 教室管理
            path: 'room',
            name: 'room',
            meta: {
              author: ['管理员', '出题者']
            },
            component: () => import(/* webpackChunkName: "class" */ '../../components/class/Room.vue'),
            title: '教室管理',
            id: 42

          },
          {
            // 学生管理
            path: 'student',
            name: 'student',
            meta: {
              author: ['管理员', '出题者']
            },
            component: () => import(/* webpackChunkName: "class" */ '../../components/class/Student.vue'),
            title: '学生管理',
            id: 43
          }
        ]
      },
      {
        // 阅卷管理
        path: 'checkPaperManage',
        name: 'CheckPaperManage',
        meta: {
          author: ['管理员', '出题者']
        },
        component: () => import('../../views/Home/CheckPaperManage/index.vue'),
        title: '阅卷管理',
        icon: 'ios-stats',
        id: 5,
        children: [
          {
            //   待批班级
            path: 'paper/classlist',
            name: 'awaitclasslist',
            meta: {
              author: ['管理员', '出题者']
            },
            component: () => import(/* webpackChunkName: "paper" */ '../../components/checkpaper/WaitCheck.vue'),
            title: '待批班级',
            id: 51
          },
          {
            //   要批改的试卷详情
            path: 'paper/detail',
            name: 'paperdetail',
            meta: {
              author: ['管理员', '出题者']
            },
            component: () => import(/* webpackChunkName: "paper" */ '../../components/checkpaper/PaperDetail.vue'),
            id: 52
          },
          {
            //   要阅卷总分数
            path: '/home/checkPaperManage/paper/class',
            name: 'paperclass',
            meta: {
              author: ['管理员', '出题者']
            },
            component: () => import(/* webpackChunkName: "paper" */ '../../components/checkpaper/PaperClass.vue'),
            id: 53
          }
        ]
      }
    ]
  }
]
